﻿namespace OP30.ViewModels
{
    public class BaseViewModel : BindableBase
    {
        public readonly IRegionManager _regionManager;

        public BaseViewModel(IRegionManager regionManager)
        {
            _regionManager = regionManager;

        }

        private DelegateCommand _GoBackCommand;

        public DelegateCommand GoBackCommand =>
            _GoBackCommand ?? (_GoBackCommand = new DelegateCommand(ExecuteGoBackCommand));

        void ExecuteGoBackCommand()
        {
            _regionManager.RequestNavigate(PrismManager.MainViewRegionName, AppViews.MenuView);
        }
    }
}
